const mongoose = require("mongoose");
const ordersSchema = new mongoose.Schema({
    name:String,
    price:String,
    imagePath:String,
    num:String,
    //订单状态值，默认为解冻state=add
    //取消（state=cancel）、发货（state=shipments）、延长收货（state=overtime）延长收货在发货之后才可操作
    state:String,
    type:String,
    address:String,
    shopsId: {
        type: mongoose.Schema.Types.ObjectId,
        ref: "shopsModel"
    }
})
mongoose.model("ordersModel",ordersSchema,"orders")